<?php
class Say{
	var $id = -1;
	var $uid = '';
	var $content = '';
	var $publishDate = '';
	var $commonNum = 0;
	var $viewNum = 0;

	function __construct() {
		$name = "Say".func_num_args();
		$args = func_get_args();
		if(method_exists($this, $name)){
			$this->__call($name,$args);
		}
	}

	function __call($name, $arg) {
		return call_user_func_array(array($this, $name), $arg);
	}
	function Say0(){
		
	}
	
	function Say3($uid,$content,$publishDate){
		$this->uid = $uid;
		$this->content = $content;
		$this->publishDate = $publishDate;
	}
	function Say6($id,$uid,$content,$publishDate,$commonNum,$viewNum){
		$this->id = $id;
		$this->uid = $uid;
		$this->content = $content;
		$this->publishDate = $publishDate;
		$this->commonNum = $commonNum;
		$this->viewNum = $viewNum;
	}
	
	public static function res2Say($res){
		$say = new Say();
		$say->id = $res->fields['id'];
		$say->uid = $res->fields['uid'];
		$say->content = $res->fields['content'];
		//$say->
	}
}